package com.lc202310;

/**
 * Description:
 *
 * @Create 2023/10/17 22:41
 * @Version 1.0
 */
public class Solution2652 {
    public int sumOfMultiples(int n) {
        int res = 0;
        for (int i = 1; i <= n; i++) {
            if (i % 3 == 0 || i % 5 == 0 || i % 7 == 0) {
                res += i;
            }
        }
        return res;
    }
}
